package forfun;

public class Main {

	/**
	 * Find sum of all prime numbers lesser than 300
	 */
	public static void main(String[] args) {
		int start;
		int end=300;
		
		int sum=0;
		
		for (start=0; start<end; start++){
			int count=0;
			for(int num=start-1;num>0; num--){
				int temp;
				if (start % num ==0){
					temp=num;
					count++;
				}
			}
			
			if(count==1){
				//it's a prime num !!
				System.out.println("Prime number: "+start);
				sum=sum+start;
			}
		}
		
		System.out.println("La somme: "+sum);
		
		
	}
	
	
}
